<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;

class AdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('admins')->insert([
            'name' => '王永建',
            'mobile' => '13918132072',
            'created_at' => Date('Y-m-d H:i:s',time()),
            'updated_at' => Date('Y-m-d H:i:s',time()),
            'password' => Hash::make('123456'),
        ]);

        DB::table('companies')->insert([
            'title' => '匠筑云',
            'logo' => '',
            'address' => '华东地区',
            'uscc' => '13918132072',
            'contacts' => 'wns',
            'scale' => '200',
            'mobile' => '13918132072',
            'status' => 1,
            'created_at' => Date('Y-m-d H:i:s',time()),
            'updated_at' => Date('Y-m-d H:i:s',time()),
        ]);

        DB::table('company_admins')->insert([
            'company_id' => 1,
            'role_id' => 0,
            'admin_id' => 1,
            'avatar' => '',
            'sex' => '1',
            'id_card' => '',
            'status' => 1,
            'created_at' => Date('Y-m-d H:i:s',time()),
            'updated_at' => Date('Y-m-d H:i:s',time()),
        ]);
    }
}
